import { ref } from 'vue'

// 点击高亮和打开新窗口
export const useItem = () => {
  const currentIndex = ref(0)
  const handleItemClick = (index: number, url: string) => {
    currentIndex.value = index
    // window.open(url, '_blank', 'width=1000, height=800')
    window.exposeApi.openDetailsWindow(url)
  }

  return {
    currentIndex,
    handleItemClick
  }
}